-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Upgrade cpuinfo version and update some CPU feature detection code #26598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Upgrade cpuinfo version and update some CPU feature detection code #26598
Conversation
…e cpuinfo functions which are now implemented.
…ing CPUIDInfo::HasArm_SME2().
onnxruntime/core/mlas/lib/qgemm.cpp
Outdated
| #if defined(USE_KLEIDIAI) && !defined(_MSC_VER) | ||
| return ArmKleidiAI::UseSME2; | ||
| #else | ||
| return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a TODO here with relevant commentary and a reminder to adjust these checks once KAI support for Windows is added ?
| // Note: | ||
| // cpuinfo is using IsProcessorFeaturePresent(PF_ARM_V82_FP16_INSTRUCTIONS_AVAILABLE): | ||
| // https://github.com/pytorch/cpuinfo/blob/403d652dca4c1046e8145950b1c0997a9f748b57/src/arm/windows/init.c#L224-L225 | ||
| // However, on some systems (notably, a Windows ARM64 CI build agent), cpuinfo_has_arm_neon_fp16_arith() started to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should cpuinfo be notified to treat this as a regression in detection of fp16 support in their newer implementation if their new way (seemingly) doesn't detect fp16 reliably on certain Windows versions ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, it would be good to fix it there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created a PR: pytorch/cpuinfo#348
Description
Upgrade cpuinfo version.
Update ARM64 Windows feature detection to use cpuinfo functions which are now implemented.
Add helper function
MlasIsDynamicQGemmAvailable()to abstract away platform-specific checks.Motivation and Context
Additional ARM64 Windows feature detection was implemented in cpuinfo in this commit. Update ORT to use the newly implemented feature detection.